/*
 * View.java
 *
 * Created on October 9, 2007, 11:02 AM
 */

package org.osdtsystem.dataset;

import org.osdtsystem.hierarchy.HClass;
import org.osdtsystem.hierarchy.Hierarchy;

/**
 * Interface for a view of a data set. A view provides high-level access to the
 * features in a data set, either all of them or a selection of them. A view may
 * be simple or a composite view composed of a number of subviews. The view has
 * an associated hierarchy, and each data point in the view corresponds to a
 * terminal class in this hierarchy.
 * @param <H> the type
 * @author Martin Haulrich and Matthias Buch-Kromann
 */
public interface HierarchyView<H extends HClass> extends View {    
    /**
     * The hierarchy associated with the view.
     * @return the hierarchy
     */
    public Hierarchy<H> hierarchy();

    /**
     * The subview with the given index.
     * @param <H2> the type of the classes in the subview
     * @param hclassType the type of the classes in the subview
     * @param index the index of the subview
     * @return the subview
     */
    public <H2 extends HClass> HierarchyView<H2> subview(Class<H2> hclassType, int index);
}
